<?php
if(!$this->input->is_ajax_request()){
?>
<h1 class="product-title">Our Products</h1>
<ul class="product-list-category">
	<li><a href="<?php echo site_url('category/0/all');?>" <?php if($current_cate == 0){?>class="active"<?php } ?>>View All</a></li>
	<?php
	foreach($categories as $cat){
	?>
	<li><a href="<?php echo site_url('category/'.$cat['id'].'/'.$cat['slug']);?>" <?php if($current_cate == $cat['id']){?>class="active"<?php } ?>><?php echo $cat['title'];?></a></li>
	<?php
	}
	?>
</ul>
<div class="box-space"></div>
<?php 
}
?>
<div class="product-list">
	<ul>
		<?php 
		foreach($products as $product) { ?>
		<li>
			<div class="thumb">
				<a href="<?php echo site_url('product/'.$product['id'].'/'.$product['slug']);?>"><img src="<?php echo config_item('asset');?>img/product/<?php echo str_replace('.', '_thumb.', $product['pic1']); ?>" width="300" height="130"></a>
			</div>
			<a class="title" href="<?php echo site_url('product/'.$product['id'].'/'.$product['slug']);?>">
				<?php echo $product['title'];?>
			</a>
			<div class="category">
				<?php echo $product['category_title'];?>
			</div>
			<a class="readmore" href="<?php echo site_url('product/'.$product['id'].'/'.$product['slug']);?>">
				Read more
			</a>
		</li>
		<?php } ?>
	</ul>
</div>
